package com.hdu.careerplan.mapper;

import com.hdu.careerplan.pojo.entity.Resume;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
* @author 10240
* @description 针对表【resume】的数据库操作Mapper
* @createDate 2024-03-12 09:28:44
* @Entity com.hdu.careerplan.pojo.entity.Resume
*/
@Mapper
public interface ResumeMapper extends BaseMapper<Resume> {

//    @Select("<script>"
//            + "SELECT user_id, "
//            + "<if test='skills != null and skills.size() > 0'>"
//            + "<foreach item='skill' index='index' collection='skills' open='(' separator='+' close=')'>"
//            + "   JSON_CONTAINS(skills, #{skill}) "
//            + "</foreach>"
//            + "</if>"
//            + "AS count "
//            + "FROM resume "
//            + "</script>")


    List<Integer> findUsersWithSkills(@Param("skills")List<String> skills, @Param("offset") int offset, @Param("size") int size);

    int countUsersBySkills(@Param("skills")List<String> skills);

}




